getAnimatedValue

abstract fun getAnimatedValue(block: DesignBlock, property: String, time: Float): KeyframeValue

Get the value that the keyframes give a block property at a time. A relative track adds the static value. A property without keyframes gives its static value. A position/x or position/y track overrides that axis of a position track. Without its own track, position/x gives the x of the position track. An angle is in the angle unit of the scene. Animation presets and the turn along a motion path are not included. A rotation track also moves a block without an anchor, so that it turns around its frame centre. That move is not included either. Throws BLOCK.KEYFRAMES_TIME_OUT_OF_RANGE for a time outside 0, 1, or BLOCK.KEYFRAMES_PROPERTY_NOT_ANIMATABLE when the property has no keyframes and isPropertyAnimatable returns false.

Return

the value, of the property's kind.

Parameters

block

the block that owns the property.

property

the animatable property path, e.g. opacity.

time

the normalized time over the block's playback/duration, from 0 to 1, as keyframe times are.